package cn.gx.learn.security_boot_jwt_websocket.websocket_origin.service;

import cn.gx.learn.security_boot_jwt_websocket.websocket_origin.dal.database.Message;

import jakarta.websocket.Session;


public interface MessageService {
    //在线转发
    public String sendMessageOnline(Message message, Session session);


    //不在线存储
    public String sendMessageOffline(Message message);


    //上线发消息(可以用事件机制，但监听的异常会传播到onopen方法，需要在监听器里捕获全部异常）
    public String sendMessageWhenOnline(Session session,Integer userId);



}
